package edu.nf.admin.controller.item;

import edu.nf.admin.controller.BaseController;
import edu.nf.waimai.service.item.ItemTypeService;
import edu.nf.waimai.service.item.impl.ItemTypeServiceImpl;
import org.nf.web.annotation.RequestMapping;
import org.nf.web.annotation.RequestParam;
import org.nf.web.servlet.View;
import org.nf.web.servlet.view.JsonView;

public class ItemTypeController extends BaseController {
    private ItemTypeService service = new ItemTypeServiceImpl();

    @RequestMapping("/edu/nf/admin/controller/admin/itemType/getItemTypeList")
    public View getItemTypeList(){
        //未完成
        return new JsonView(success());
    }

    /**
     * 删除商品类型
     * @param itemTypeId
     * @return
     */
    @RequestMapping("/edu/nf/admin/controller/admin/itemType/delItemType")
    public View delItemType(@RequestParam("itemTypeId") int itemTypeId){
        return new JsonView(success(service.delItemTypeById(itemTypeId)));
    }
}
